package com.blb.orderservice.client;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.orderservice.pojo.Product;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

/**
 * 针对商品服务的熔断降级类
 */
@Component
public class ProductServiceClientFackback implements ProductServiceClient{

    @Override
    public ResponseEntity<Product> getProductById(Long id) {
        Product product = new Product();
        product.setName("降级数据");
        return ResponseEntity.ok(product);
    }

    @Override
    public ResponseEntity<Page<Product>> getProductPage(Long current, Long size) {
        return null;
    }

    @Override
    public ResponseEntity<Product> addProduct(Product product) {
        return null;
    }

    @Override
    public ResponseEntity<Product> updateProduct(Product product) {
        return null;
    }

    @Override
    public ResponseEntity<Long> deleteProduct(Long id) {
        return null;
    }
}
